import { createRouter, createWebHashHistory, createWebHistory } from 'vue-router'

const router = createRouter({
	// history: createWebHistory(import.meta.env.BASE_URL),
	history: createWebHashHistory('/wisdom_city/'),
	// base: '/dist/',
	routes: [
		{
			path: '/',
			name: 'home',
			redirect: '/standardization/database',
		},
		{
			path: '/test',
			name: 'test',
			component: () => import('../views/test.vue')
		},
		{
			path: '/standardization',
			name: 'standardization',
			redirect: '/standardization/database',
			component: () => import('../views/Standardardization/Standardization.vue'),
			children: [
				{ path: 'database', name: 'database', component: () => import('../views/Standardardization/Database.vue'), meta: { breadNum: 1 } },
				{ path: 'table', name: 'table', component: () => import('../views/Standardardization/Table.vue'), meta: { breadNum: 2 } },
				{ path: 'aline', name: 'aline', component: () => import('../views/Standardardization/Aline.vue'), meta: { breadNum: 3 } },
			],
		},
		{
			path: '/service',
			name: 'service',
			redirect: '/service/service_list',
			meta: { index: 2 },
			component: () => import('../views/BuildService/ServiceView.vue'),
			children: [
				{
					path: 'service_list',
					name: 'service_list',
					component: () => import('../views/BuildService/ServiceListView.vue'),
				},
				{
					path: '/edit_service',
					name: 'edit_service',
					component: () => import('../views/BuildService/CreateServiceView.vue'),
				},
				{
					path: '/invoke_service',
					name: 'invoke_service',
					component: () => import('../views/BuildService/InvokeServiceView.vue'),
				},
				{
					path: 'create_service',
					name: 'create_service',
					component: () => import('../views/BuildService/CreateServiceView.vue'),
				},
				{
					path: 'create_insert_service',
					name: 'create_insert_service',
					component: () => import('../views/BuildService/CreateInsertServiceView.vue'),
				},
				{
					path: 'create_identify_service',
					name: 'create_identify_service',
					component: () => import('../views/BuildService/CreateIdentifyServiceView.vue'),
				},
			]
		},
		{
			path: '/combine',
			name: 'combine',
			redirect: '/combine/list',
			meta: { index: 2 },
			component: () => import('../views/Combine/ServiceView.vue'),
			children: [
				{
					path: 'list',
					name: 'list',
					component: () => import('../views/Combine/CombineServiceListView.vue'),
				},
				{
					path: 'instance_list',
					name: 'instance_list',
					component: () => import('../views/Combine/InstanceListView.vue'),
				}, 
				{
					path: 'combine_detail',
					name: 'combine_detail',
					component: () => import('../views/Combine/InvokeServiceView.vue'),
				},
				{
					path: 'edit',
					name: 'edit',
					component: () => import('../views/Combine/EditServiceView.vue'),
				},
			]
		},
		{
			path: '/knowledgegraph',
			redirect: '/knowledgegraph/knowledge_extraction',
			name: 'knowledgegraph',
			component: () => import('../views/KnowledgeGraph/KnowledgeGraphView.vue'),
			children: [
				{
					path: 'knowledge_extraction',
					name: 'knowledge_extraction',
					component: () => import('../views/KnowledgeGraph/Knowledge_extraction/knowledge_extraction.vue'),
				},
				{
					path: '/knowledge_graph',
					name: 'knowledge_graph',
					component: () => import('../views/KnowledgeGraph/Knowledge_graph/knowledge_graph.vue'),
				},
				{
					path: '/graph_build_instance',
					name: 'graph_build_instance',
					component: () => import('../views/KnowledgeGraph/Graph_build_instance/graph_build_instance.vue'),
				},
				{
					path: '/graph_guide',
					name: 'graph_guide',
					component: () => import('../views/KnowledgeGraph/Graph_guide/graph_guide.vue'),
				},
				{
					path: '/graph_build',
					name: 'graph_build',
					component: () => import('../views/KnowledgeGraph/Graph_build/graph_build.vue'),
				},
				{
					path: '/graph_update',
					name: 'graph_update',
					component: () => import('../views/KnowledgeGraph/Graph_update/graph_update.vue'),
				},
				{
					path: '/graph_alignment',
					name: 'graph_alignment',
					component: () => import('../views/KnowledgeGraph/Graph_alignment/graph_alignment.vue'),
				},
			]
		},
		{
			path: '/probe',
			name: 'probe',
			redirect: '/probe/list',
			component: () => import('../views/Probe/ProbeView.vue'),
			children: [
				{
					path: 'list',
					name: 'probe_list',
					component: () => import('../views/Probe/StandardListView.vue'),
				},
				{
					path: 'create',
					name: 'probe_create',
					component: () => import('../views/Probe/CreateStandardView.vue'),
				}
			]
		},
	]
})

export default router
